<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Hash;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class HomeUserController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    // ===============================================================查询用户
    public function getIndex()
    {
        //查询用户信息
        $user = DB::table('dota_user')->where('id',124)->first();
        $time = time();
        $ip = $_SERVER['REMOTE_ADDR'];
        
        $dingdan = DB::table('dota_orders')->where('uid',124)->skip(0)->take(2)->get();
        // dd($dingdan);
        $times = DB::table('dota_user')->where('id',124)->update(['time'=>$time,'ip_address'=>$ip]);
        return view('home.uscenter.uscenter',['user'=>$user,'dida'=>$dingdan]);
    }

 

}
